package org.example.DesignPatterns.ChainOfResponsibility;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-20 20:54
 **/
public class Manager extends Approver{

    public Manager(String name){
        super(name);
    }

    @Override
    public void approve(int amount){
        if(amount<=5000){
            System.out.println("审批通过，经理["+name+"]");
        }else{
            System.out.println("无权审批，升级处理，经理["+name+"]");
            this.nextApprover.approve(amount);
        }
    }
}